#ifndef TEXTUREQUAD_H_
#define TEXTUREQUAD_H_

#include "GL/gl.h"
#include "TexPt.h"
#include "OpenGLImage.h"
#include "opencv/cv.h"

class TextureQuad {
public:
	TextureQuad();
			TextureQuad(GLuint startTexID = 0xdeadbeef, GLuint endTexID =
					0xdeadbeef, GLuint *fadeTexIDs = 0, int dynamicFrames = 2,
					int staticFrames = 2);
	void draw();
	void update(OpenGLImage* image);
	void incrFrame();
private:
	void getGLProjTransMat(CvPoint2D32f dstQuadPts[4],
			CvPoint2D32f srcQuadPts[4], GLfloat glProjTransMat[16]);
	GLuint *fadeTexIDs;
	GLuint startTexID;
	GLuint endTexID;
	TexPt start[8];
	TexPt end[8];
	int dynamicFrames;
	int staticFrames;
	int frame;
	int bounds[3];
};

#endif /* TEXTUREQUAD_H_ */
